<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
<ui:composition
        template="/WEB-INF/template/home.xhtml">
    <ui:define name="location">
        #{msg['popup.user.info']}
    </ui:define>
    <ui:define name="context">
        <h:form id="userGrid" prependId="false">
            <!--tool-->
            <rich:toolbar id="ToolBar">
                <rich:toolbarGroup id="ActionToolBar">
                    <a4j:commandLink id="addUser" styleClass="no-decor" value="#{msg['link.add']}" execute="@this"
                                     render="editUserEntity,UserPopupCmpHeader" action="#{userBean.popupAdd}" limitRender="true"
                                     oncomplete="PawnPopup.show('userEntity')">
                    </a4j:commandLink>
                </rich:toolbarGroup>
                <rich:toolbarGroup>
                </rich:toolbarGroup>
                <rich:toolbarGroup id="SearchToolBar" location="right">
                    <h:inputText id="SearchUserName" value="#{userBean.filterValues['userName']}">
                        <a4j:ajax render="userlist@body userScroller" event="keyup"/>
                    </h:inputText>
                </rich:toolbarGroup>
            </rich:toolbar>
            <ui:include src="usr/list.xhtml"/>
        </h:form>

        <!--新增或者编辑面板-->
        <ui:decorate template="/WEB-INF/template/popupCmp.xhtml">
            <ui:param name="popupCmpId" value="userEntity"/>
            <ui:define name="header">
                <a4j:outputPanel id="UserPopupCmpHeader">
                    #{userBean.entity.id eq 0 ? msg['link.add'] :msg['link.Edit']}#{msg['popup.user.info']}
                </a4j:outputPanel>
            </ui:define>
            <ui:param name="includePage" value="/bam/usr/entity.xhtml"/>
        </ui:decorate>
    </ui:define>
</ui:composition>
</html>